package com.lingx.web.api.impl;

import java.util.Map;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Component;

import com.lingx.service.LingxService;
import com.lingx.web.api.IApi;
@Component
public class Api8006 extends AbstractApi implements IApi{
	public Api8006() {
		this.startTime=System.currentTimeMillis();
	}
	@Resource
	private JdbcTemplate jdbcTemplate;
	@Resource
	private LingxService lingxService;
	private long startTime;
	@Override
	public int getApiCode() {
		return 8006;
	}
	@Override
	public String getApiName() {
		return "获取App";
	}

	public boolean isLog() {
		return false;
	}
	@Override
	public Map<String, Object> api(Map<String, Object> params) {
		Map<String,Object> ret=IApi.getRetMap(1, "操作成功");
		Map<String,Object> app=this.jdbcTemplate.queryForMap("select * from tlingx_app	where id=?","335ec1fc-1011-11e5-b7ab-74d02b6b5f61");
		app.put("loginComment", this.lingxService.getConfigValue("lingx.system.login.comment", ""));
		app.put("mainComment", this.lingxService.getConfigValue("lingx.system.main.comment", ""));
		app.put("beian", this.lingxService.getConfigValue("lingx.system.beian", ""));
		app.put("verifyType", this.lingxService.getConfigValue("lingx.login.verify.type", "verify_code"));//verify_code
		ret.put("data", app);
		ret.put("ts", this.startTime);
		return ret;
	}

}
